package com.atguigu.tingshu.account.client;


import com.atguigu.tingshu.account.service.UserAccountService;
import com.atguigu.tingshu.common.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/***
 * service-account提供内部支付相关接口
 */
@RestController
@RequestMapping("/client/account/userAccount")
public class UserAccountClientController {

    @Autowired
    private UserAccountService userAccountService;

    /**
     * 获取余额支付的支付url
     * @param params
     * @return
     */
    @GetMapping("/getPayInfo")
    public Result getPayInfo(@RequestParam Map<String,String> params){
        return Result.ok(userAccountService.getPayInfo(params));
    }



}
